<template>
	<view class="wrap">
		<view class="observe-assistant" @click="close">
			<view style="display: flex; justify-content: center; align-items: center;">
				<image class="icon icon-assistant" />
				<text style="display: block; margin-left: 8px; letter-spacing: 3rpx;">{{cancelText}}</text>
			</view>
		</view>
		<view class="save-btn" style="letter-spacing: 3rpx;">
			<view class="btn" @click="confirm">{{confirmText}}</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "rf-submit",
		props: {
			show: {
				type: Boolean,
				required: true,
				default: false,
			},
			cancelText: {
				type: String,
				required: true,
				default: "AI生成学期评价"
			},
			confirmText: {
				type: String,
				required: true,
				default: "保存"
			}
		},
		data() {
			return {

			};
		},
		watch: {
			show(val) {
				console.log("----=-=-=-=-");
				console.log(val);
			},

		},
		methods: {
			confirm() {
				this.$emit('handleSave')
			},
			close() {
				this.$emit('handleUseAi')
			}
		}
	}
</script>

<style lang="scss">
	.wrap {
		display: flex;
		align-items: center;
		margin-top: 40rpx;
		margin-bottom: 40rpx;

		.observe-assistant {
			flex: 5;
			height: 88rpx;
			background-color: #FFA930;
			border-radius: 44rpx;
			display: flex;
			justify-content: center;
			align-items: center;

			.icon {
				width: 57.4rpx;
				height: 54rpx;
			}

			text {
				margin-left: 16rpx;
				font-weight: 600;
				font-size: 32rpx;
				color: #FFFFFF;
				line-height: 44rpx;
				text-align: left;
				font-style: normal;
			}
		}

		.save-btn {
			flex: 3;
			margin-left: 30rpx;

			.btn {
				height: 88rpx;
				border: none;
				border-radius: 44rpx;
				background-color: #58C866;
				font-size: 32rpx;
				font-weight: bold;
				color: #fff;

				display: flex;
				justify-content: center;
				align-items: center;

			}
		}

	}
</style>